{extend name="public:index"/} {block name="title"}{:sysconf('title')}{/block} {block name="content"}
<body style="background: url(/public/index/images/cjbg.jpg) no-repeat center;background-size:100%;">
<div class="whtop">
    <div class="top">
        <p class="p1">
            <a href="javascript:history.back(-1)"></a>
        </p>
        <p class="p2">大转盘</p>
        <p class="p3">
            <a href="log.html"><img src="__INDEX__/images/dzp.png" alt=""></a>
        </p>
    </div>
</div>
<script type="text/javascript" src="__INDEX__/scripts/jQueryRotate.js"></script>
<script type="text/javascript" src="__INDEX__/scripts/script.js"></script>
<div class="rotate-con-pan">

    <div class="rotate-con-zhen"></div>

</div>
<div style="color:#ccc;padding:1rem;text-align:center;">注：本活动最终解释权归官方所有。</div>

<script type="text/javascript">
    $(function() {
        var zhuan = 1;
        $(".rotate-con-zhen").rotate({
            bind: {
                click: function() {
                    if (zhuan == 2) {
                        return false;
                    }
                    zhuan = 2
                    $.ajax({
                        url: "{:url('suan')}", //请求地址
                        type: "post", //请求方式
                        async: false, //同步验证
                        dataType: "json",
                        success: function(data) {

                            // 此处放成功后执行的代码
                            if (data.code == 0) {
                                $('.rotate-con-zhen').rotate({
                                    duration: 6000, //转动时间
                                    angle: 0, //起始角度
                                    animateTo: 1440 + parseInt(data.jiaodu), //结束的角度
                                    //animateTo: 1440 + 60, //结束的角度
                                    easing: $.easing.easeOutSine, //动画效果，需加载jquery.easing.min.js
                                    callback: function() {
                                        // $("#shuoming").html(data.yes);
                                        // setTimeout(function() {
                                        //     $(".hint-show,.mask").show();
                                        // }, 100);
                                        layer.msg(data.yes);
                                        zhuan = 1;
                                    }
                                });
                            } else {
                                $("#shuoming").html(data.msg);
                                setTimeout(function() {
                                    $(".hint-show,.mask").show();
                                }, 100);
                                zhuan = 1;
                            }
                        }
                    })
                }
            }
        });

    });
</script>

</script>
{/block}